package cn.wolfcode.p2p.business.query;

import cn.wolfcode.p2p.base.query.QueryObject;
import cn.wolfcode.p2p.util.DateUtil;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 还款列表
 */
@Setter
@Getter
public class PaymentScheduleQuery extends QueryObject {
    private Integer state = -1;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date beginDate;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDate;

    private Long borrowUserId;

    public Date getEndDate() {
        return DateUtil.getEndDate(endDate);
    }

}

